home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 1
/
Amiga Tools.iso
/
wb-tools
/
blanker
/
flyingtoaster
/
win.h
< prev
Wrap
Text File
|
1994-06-06
|
6KB
|
328 lines
/*--------------------------------------------------------------------------*/
/* */
/* F l y i n g T o a s t e r s */
/* */
/* */
/* */
/*--------------------------------------------------------------------------*/
/* WIN.c */
/*--------------------------------------------------------------------------*/
#if defined(WIN_C)
/*--------------------------------------------------------------------------
D E F I N I T I O N S
--------------------------------------------------------------------------*/
#define BEVEL_X (popup_win->Width - popup_win->BorderRight - IM_WIDTH - 12 * GAP)
#define BEVEL_Y (popup_win->BorderTop + 10)
#define GAP 5
#define BEVEL_DX (IM_WIDTH + 10 * GAP)
#define BEVEL_DY (IM_HEIGHT + 2 * GAP)
#define FT_X (BEVEL_X + 5 * GAP)
#define FT_Y (BEVEL_Y + GAP)
#define GADGETMAX 9
#define GAD_OBJECTS 0
#define GAD_TIMEOUT 1
#define GAD_DELAYRATE 2
#define GAD_HIDE 3
#define GAD_QUIT 4
#define GAD_BLANK 5
#define GAD_FLIGHT_MODE 6
#define GAD_SLEEP 7
#define GAD_NEVER 8
#define MN_HIDE 0
#define MN_QUIT 1
#define MN_BLANK 2
#define MN_ABOUT 3
#define MN_FREE_FLIGHT 4
#define MN_DEF_FLIGHT 5
#define MN_LOOP 6
#define MN_FACE2FACE 7
#define WINFLAGS (WFLG_SMART_REFRESH | WFLG_ACTIVATE | \
WFLG_DRAGBAR | WFLG_DEPTHGADGET | \
WFLG_CLOSEGADGET)
#define IDCMPFLAGS (SLIDERIDCMP | IDCMP_CLOSEWINDOW | \
IDCMP_MENUPICK | MXIDCMP | CYCLEIDCMP)
#define POINTER_HEIGHT 0
#define POINTER_WIDTH 0
/*--------------------------------------------------------------------------
V A R I A B L E S
--------------------------------------------------------------------------*/
LOCAL struct TagItem win_tags[] = {
WA_Left, 0, // 0
WA_Top, 0, // 1
WA_Width, 640, // 2
WA_Height, 512, // 3
WA_IDCMP, 0, // 4
WA_Flags, WFLG_SIMPLE_REFRESH|WFLG_BORDERLESS|
WFLG_ACTIVATE, // 5
WA_ScreenTitle, 0L, // 6
WA_CustomScreen, 0L, // 7
TAG_DONE };
LOCAL struct TagItem popup_win_tag[] = {
{ WA_Left, (Tag) 20 },
{ WA_Top, (Tag) 20 },
{ WA_Title, (Tag) "Flying Toasters! (w)92 Gernot Reisinger" },
{ WA_Width, (Tag) 400 },
{ WA_Height, (Tag) 200 },
{ WA_PubScreenName, (Tag) "Workbench" },
{ WA_AutoAdjust, (Tag) TRUE },
{ WA_PubScreenFallBack, (Tag) TRUE },
{ WA_IDCMP, (Tag) IDCMPFLAGS },
{ WA_Flags, (Tag) WINFLAGS },
{ TAG_DONE, (Tag) 0 }
};
LOCAL struct ColorSpec scr_cols[] = {
0, 0x00, 0x00, 0x00,
1, 0x0F, 0x0F, 0x0F,
~0, 0x00, 0x00, 0x00 };
LOCAL UWORD dri_pens[] = {
~0 };
LOCAL struct TagItem scr_tags[] = {
SA_Left, 0, // 0
SA_Top, 0, // 1
SA_Depth, 1, // 2
SA_Behind, TRUE, // 3
SA_Quiet, TRUE, // 4
SA_Overscan, OSCAN_MAX, // 5
SA_Colors, (LONG) scr_cols, // 6
SA_Type, CUSTOMSCREEN, // 7
SA_DisplayID, HIRESLACE_KEY, // 8
SA_Pens, (LONG) dri_pens, // 9
TAG_DONE
};
LOCAL struct TextAttr ta_courier = {
"courier.font",11,FS_NORMAL,FPF_DISKFONT
};
LOCAL struct IntuiText itxt = {
1,0,
JAM2,
0,0,
&ta_courier,
NULL,
NULL
};
LOCAL UCHAR *about_txt[] = {
// "12345678901234567",
// |
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
" It's"
"",
"",
"",
" Flying",
" Toasters!",
"",
" Written by",
" Gernot",
" Reisinger",
"",
" Flying Toasters",
"is public domain.",
" No commercial",
" selling!",
"",
" Send",
" me a Postcard",
"of your Hometown",
"",
" write to",
"",
"Gernot Reisinger",
" Geinberg 121",
" 4943 Austria",
" (Europe)",
"",
" EMail:",
"",
" gr@\\",
" cast.uni-linz\\",
" ac.at",
NULL
};
LOCAL UCHAR *flight_mode_txt[] = {
"Free Flight",
"Default Flight",
"Loop",
"Face2Face",
NULL
};
LOCAL UWORD chip pointer_data[] = {
0
};
LOCAL struct NewGadget ng[GADGETMAX] = {
{
0,
0,
120,
13,
"Number of Objects",
&ta_courier,
GAD_OBJECTS,
PLACETEXT_ABOVE,
NULL,
NULL
},
{
0,
0,
120,
13,
"Screen Timeout",
&ta_courier,
GAD_TIMEOUT,
PLACETEXT_ABOVE,
NULL,
NULL
},
{
0,
0,
120,
13,
"Speedometer",
&ta_courier,
GAD_DELAYRATE,
PLACETEXT_ABOVE,
NULL,
NULL
},
{
2 * GAP,
- 2 * GAP - 15,
60,
15,
"Hide",
&ta_courier,
GAD_HIDE,
PLACETEXT_IN,
NULL,
NULL
},
{
GAP * 2 + 1 * (60 + INTERWIDTH),
- 2 * GAP - 15,
60,
15,
"Blank",
&ta_courier,
GAD_BLANK,
PLACETEXT_IN,
NULL,
NULL
},
{
GAP * 2 + 2 * (60 + INTERWIDTH),
- 2 * GAP - 15,
60,
15,
"Quit",
&ta_courier,
GAD_QUIT,
PLACETEXT_IN,
NULL,
NULL
},
{
0,0,
0,
0,
NULL,
&ta_courier,
GAD_FLIGHT_MODE,
PLACETEXT_RIGHT,
NULL,
NULL
},
{
0,0,
120,
15,
"Sleep Corner",
&ta_courier,
GAD_SLEEP,
PLACETEXT_ABOVE,
NULL,
NULL
},
{
0,0,
120,
15,
"Never Sleep Corner",
&ta_courier,
GAD_NEVER,
PLACETEXT_ABOVE,
NULL,
NULL
}
};
LOCAL struct NewMenu prefs_nmenu[] = {
{ NM_TITLE, "Project", NULL, 0, 0, NULL },
{ NM_ITEM, "About", NULL, 0, 0, (APTR) MN_ABOUT },
{ NM_ITEM, "Hide", "H", 0, 0, (APTR) MN_HIDE },
{ NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL },
{ NM_ITEM, "Quit", "Q", 0, 0, (APTR) MN_QUIT },
{ NM_TITLE, "Action", NULL, 0, 0, NULL },
{ NM_ITEM, "Blank Screen", "B", 0, 0, (APTR) MN_BLANK },
{ NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL },
{ NM_ITEM, "Free Flight", "1", 0, 0, (APTR) MN_FREE_FLIGHT },
{ NM_ITEM, "Default Flight", "2", 0, 0, (APTR) MN_DEF_FLIGHT },
{ NM_ITEM, "Loop" , "3", 0, 0, (APTR) MN_LOOP },
{ NM_ITEM, "Face2Face", "4", 0, 0, (APTR) MN_FACE2FACE },
{ NM_END, NULL, NULL, 0, 0, NULL }
};
LOCAL struct Menu *prefs_menu;
UCHAR *corner_txt[] = {
"top left",
"top right",
"bottom left",
"bottom right",
"disabled",
NULL
};
#endif